package IOStreamTest;

import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @author 刘全
 * @date 2021/8/1
 */
public class IOTryCatch1 {
    public static void main(String[] args) {
        FileOutputStream fos = null;
        try {
            fos = new FileOutputStream("myideaTest\\code.txt",true);
            fos.write("\r\n".getBytes());
            fos.write(97);
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            if (fos != null) {
                try {
                    fos.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
